#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <signal.h>
#include <unistd.h>
#include <sys/wait.h>
#include <errno.h>

#ifdef SYSTEMV
	#include <sys/msg.h>
	#include <sys/ipc.h>
#else
	#include <mqueue.h>
#endif

#ifdef SYSTEMV
	#define SERVER_FILE "./server.key"
#else
	#define SERVER_FILE "/server.key"
#endif

#define OUTPUT "./result.txt"
#define MESS_LENGTH 64
#define NICK_LENGTH 32
#define TIME_LENGTH 26
#define SERVER 1
#define CLIENT 2

struct message{
#ifdef SYSTEMV
	long type;
#endif
	char msg[MESS_LENGTH];
	char nick[NICK_LENGTH];
	pid_t pid;
};
